package cn.briarbear.myblog.entity.vo;

import cn.briarbear.myblog.entity.table.Blog;

/**
 * 博客编辑视图类
 *
 * @auther Val1ant
 * http://www.val1ant.xin
 * @create 2018-05-03-10:34
 */
public class BlogModifyView {

    /**
     * id
     */
    private Integer id;
    /**
     * 标题
     */
    private String title;
    /**
     * 介绍
     */
    private String introduction;

    /**
     * markdown内容
     */
    private String mdContent;
    private String htmlContent;

    public String getHtmlContent() {
        return htmlContent;
    }

    public void setHtmlContent(String htmlContent) {
        this.htmlContent = htmlContent;
    }

    public BlogModifyView() {
    }

    /**
     * 由博客类创建博客视图类
     * @param blog
     */
    public BlogModifyView(Blog blog) {
        id = blog.getId();
        title = blog.getTitle();
        introduction = blog.getIntroduction();
        mdContent = blog.getMdContent();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getMdContent() {
        return mdContent;
    }

    public void setMdContent(String mdContent) {
        this.mdContent = mdContent;
    }
}
